﻿using System.Reflection;
using System.Configuration;
using System;
using KPIS.GERP.GFMS.IDAL;
//using KPIS.GERP.GFMS.DAL;

namespace KPIS.GERP.GFMS.DALFactory
{
    [Serializable]
    public class DataAccess
    {
        private static readonly string path = "KPIS.GERP.GFMS.DAL";

        private DataAccess()
        {

        }

        public static IDAL_ACM_GENERATE_ACCOUNT_Auto Create_ACM_GENERATE_ACCOUNT_Auto()
        {
            string className = path + ".D_ACM_GENERATE_ACCOUNT_Auto";
            return (IDAL_ACM_GENERATE_ACCOUNT_Auto)Assembly.Load(path).CreateInstance(className);
        }
        
        public static IDAL_FIM_MAS_Banks Create_FIM_MAS_Banks()
        {
            string className = path + ".D_FIM_MAS_Banks";
            return (IDAL_FIM_MAS_Banks)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_BankBranchs Create_FIM_MAS_BankBranchs()
        {
            string className = path + ".D_FIM_MAS_BankBranchs";
            return (IDAL_FIM_MAS_BankBranchs)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_BankAccounts Create_FIM_MAS_BankAccounts()
        {
            string className = path + ".D_FIM_MAS_BankAccounts";
            return (IDAL_FIM_MAS_BankAccounts)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_BankAccountTypes Create_FIM_MAS_BankAccountTypes()
        {
            string className = path + ".D_FIM_MAS_BankAccountTypes";
            return (IDAL_FIM_MAS_BankAccountTypes)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_BankAccountTypeGroups Create_FIM_MAS_BankAccountTypeGroups()
        {
            string className = path + ".D_FIM_MAS_BankAccountTypeGroups";
            return (IDAL_FIM_MAS_BankAccountTypeGroups)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_Contacts Create_FIM_MAS_Contacts()
        {
            string className = path + ".D_FIM_MAS_Contacts";
            return (IDAL_FIM_MAS_Contacts)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_Methods Create_FIM_MAS_Methods()
        {
            string className = path + ".D_FIM_MAS_Methods";
            return (IDAL_FIM_MAS_Methods)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_ReceiveTypes Create_FIM_MAS_ReceiveTypes()
        {
            string className = path + ".D_FIM_MAS_ReceiveTypes";
            return (IDAL_FIM_MAS_ReceiveTypes)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_BorrowTypes Create_FIM_MAS_BorrowTypes()
        {
            string className = path + ".D_FIM_MAS_BorrowTypes";
            return (IDAL_FIM_MAS_BorrowTypes)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_FundTypes Create_FIM_MAS_FundTypes()
        {
            string className = path + ".D_FIM_MAS_FundTypes";
            return (IDAL_FIM_MAS_FundTypes)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_Events Create_FIM_MAS_Events()
        {
            string className = path + ".D_FIM_MAS_Events";
            return (IDAL_FIM_MAS_Events)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_CalulateTaxs Create_FIM_MAS_CalulateTaxs()
        {
            string className = path + ".D_FIM_MAS_CalulateTaxs";
            return (IDAL_FIM_MAS_CalulateTaxs)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MAS_ExpenseRates Create_FIM_MAS_ExpenseRates()
        {
            string className = path + ".D_FIM_MAS_ExpenseRates";
            return (IDAL_FIM_MAS_ExpenseRates)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_ChequeBooks Create_FIM_ChequeBooks()
        {
            string className = path + ".D_FIM_ChequeBooks";
            return (IDAL_FIM_ChequeBooks)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_Cheques Create_FIM_Cheques()
        {
            string className = path + ".D_FIM_Cheques";
            return (IDAL_FIM_Cheques)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MoneyRequests Create_FIM_MoneyRequests()
        {
            string className = path + ".D_FIM_MoneyRequests";
            return (IDAL_FIM_MoneyRequests)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MoneyRequestDtls Create_FIM_MoneyRequestDtls()
        {
            string className = path + ".D_FIM_MoneyRequestDtls";
            return (IDAL_FIM_MoneyRequestDtls)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MoneyRequestDtlsRates Create_FIM_MoneyRequestDtlsRates()
        {
            string className = path + ".D_FIM_MoneyRequestDtlsRates";
            return (IDAL_FIM_MoneyRequestDtlsRates)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MoneyRequestTravelers Create_FIM_MoneyRequestTravelers()
        {
            string className = path + ".D_FIM_MoneyRequestTravelers";
            return (IDAL_FIM_MoneyRequestTravelers)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MoneyReturns Create_FIM_MoneyReturns()
        {
            string className = path + ".D_FIM_MoneyReturns";
            return (IDAL_FIM_MoneyReturns)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_MoneyReturnDtls Create_FIM_MoneyReturnDtls()
        {
            string className = path + ".D_FIM_MoneyReturnDtls";
            return (IDAL_FIM_MoneyReturnDtls)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_Petitions Create_FIM_Petitions()
        {
            string className = path + ".D_FIM_Petitions";
            return (IDAL_FIM_Petitions)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_PetitionDtls Create_FIM_PetitionDtls()
        {
            string className = path + ".D_FIM_PetitionDtls";
            return (IDAL_FIM_PetitionDtls)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_Payments Create_FIM_Payments()
        {
            string className = path + ".D_FIM_Payments";
            return (IDAL_FIM_Payments)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_Payments_Payinpack Create_FIM_Payments_Payinpack()
        {
            string className = path + ".D_FIM_Payments_Payinpack";
            return (IDAL_FIM_Payments_Payinpack)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_PaymentCheques Create_FIM_PaymentCheques()
        {
            string className = path + ".D_FIM_PaymentCheques";
            return (IDAL_FIM_PaymentCheques)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_Payroll Create_FIM_Payroll()
        {
            string className = path + ".D_FIM_Payroll";
            return (IDAL_FIM_Payroll)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_Receives Create_FIM_Receives()
        {
            string className = path + ".D_FIM_Receives";
            return (IDAL_FIM_Receives)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_ReceiveDtls Create_FIM_ReceiveDtls()
        {
            string className = path + ".D_FIM_ReceiveDtls";
            return (IDAL_FIM_ReceiveDtls)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_Transfers Create_FIM_Transfers()
        {
            string className = path + ".D_FIM_Transfers";
            return (IDAL_FIM_Transfers)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_EmployeeTaxs Create_FIM_EmployeeTaxs()
        {
            string className = path + ".D_FIM_EmployeeTaxs";
            return (IDAL_FIM_EmployeeTaxs)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_SystemControls Create_FIM_SystemControls()
        {
            string className = path + ".D_FIM_SystemControls";
            return (IDAL_FIM_SystemControls)Assembly.Load(path).CreateInstance(className);
        }

        //public static IDAL_MessageSend Create_MessageSend()
        //{
        //    string className = path + ".D_MessageSend";
        //    return (IDAL_MessageSend)Assembly.Load(path).CreateInstance(className);
        //}

        //public static IDAL_MessageReply Create_MessageReply()
        //{
        //    string className = path + ".D_MessageReply";
        //    return (IDAL_MessageReply)Assembly.Load(path).CreateInstance(className);
        //}

        //===============================BGM==========================================

        public static IDAL_BGM_MAS_Source Create_BGM_MAS_Source()
        {
            string className = path + ".D_BGM_MAS_Source";
            return (IDAL_BGM_MAS_Source)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_MAS_Expense Create_BGM_MAS_Expense()
        {
            string className = path + ".D_BGM_MAS_Expense";
            return (IDAL_BGM_MAS_Expense)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_MAS_ExpenseGroup Create_BGM_MAS_ExpenseGroup()
        {
            string className = path + ".D_BGM_MAS_ExpenseGroup";
            return (IDAL_BGM_MAS_ExpenseGroup)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_MAS_Option Create_BGM_MAS_Option()
        {
            string className = path + ".D_BGM_MAS_Option";
            return (IDAL_BGM_MAS_Option)Assembly.Load(path).CreateInstance(className);
        }


        public static IDAL_BGM_StrategyDataMapping Create_BGM_StrategyDataMapping()
        {
            string className = path + ".D_BGM_StrategyDataMapping";
            return (IDAL_BGM_StrategyDataMapping)Assembly.Load(path).CreateInstance(className);
        }

        //public static IDAL_BGM_Receive Create_BGM_Receive()
        //{
        //    string className = path + ".D_BGM_Receive";
        //    return (IDAL_BGM_Receive)Assembly.Load(path).CreateInstance(className);
        //}

        //public static IDAL_BGM_ReceiveExpense Create_BGM_ReceiveExpense()
        //{
        //    string className = path + ".D_BGM_ReceiveExpense";
        //    return (IDAL_BGM_ReceiveExpense)Assembly.Load(path).CreateInstance(className);
        //}

        public static IDAL_BGM_Project Create_BGM_Project()
        {
            string className = path + ".D_BGM_Project";
            return (IDAL_BGM_Project)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_ProjectExpense Create_BGM_ProjectExpense()
        {
            string className = path + ".D_BGM_ProjectExpense";
            return (IDAL_BGM_ProjectExpense)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_ProjectOperation Create_BGM_ProjectOperation()
        {
            string className = path + ".D_BGM_ProjectOperation";
            return (IDAL_BGM_ProjectOperation)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_ProjectOperationExpense Create_BGM_ProjectOperationExpense()
        {
            string className = path + ".D_BGM_ProjectOperationExpense";
            return (IDAL_BGM_ProjectOperationExpense)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_ProjectOperationExpenseRate Create_BGM_ProjectOperationExpenseRate()
        {
            string className = path + ".D_BGM_ProjectOperationExpenseRate";
            return (IDAL_BGM_ProjectOperationExpenseRate)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_ProjectOperationPerson Create_BGM_ProjectOperationPerson()
        {
            string className = path + ".D_BGM_ProjectOperationPerson";
            return (IDAL_BGM_ProjectOperationPerson)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_ProjectReport Create_BGM_ProjectReport()
        {
            string className = path + ".D_BGM_ProjectReport";
            return (IDAL_BGM_ProjectReport)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_BGM_ProjectOperationReport Create_BGM_ProjectOperationReport()
        {
            string className = path + ".D_BGM_ProjectOperationReport";
            return (IDAL_BGM_ProjectOperationReport)Assembly.Load(path).CreateInstance(className);
        }

        //===============================HRM==========================================

        public static IDAL_HRM_MAS_Districts Create_HRM_MAS_Districts()
        {
            string className = path + ".D_HRM_MAS_Districts";
            return (IDAL_HRM_MAS_Districts)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_MAS_Amphurs Create_HRM_MAS_Amphurs()
        {
            string className = path + ".D_HRM_MAS_Amphurs";
            return (IDAL_HRM_MAS_Amphurs)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_MAS_Provinces Create_HRM_MAS_Provinces()
        {
            string className = path + ".D_HRM_MAS_Provinces";
            return (IDAL_HRM_MAS_Provinces)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_MAS_Regions Create_HRM_MAS_Regions()
        {
            string className = path + ".D_HRM_MAS_Regions";
            return (IDAL_HRM_MAS_Regions)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_MAS_Countries Create_HRM_MAS_Countries()
        {
            string className = path + ".D_HRM_MAS_Countries";
            return (IDAL_HRM_MAS_Countries)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_MP_WorkAreas Create_HRM_MP_WorkAreas()
        {
            string className = path + ".D_HRM_MP_WorkAreas";
            return (IDAL_HRM_MP_WorkAreas)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_MP_Jobsites Create_HRM_MP_Jobsites()
        {
            string className = path + ".D_HRM_MP_Jobsites";
            return (IDAL_HRM_MP_Jobsites)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_PS_Employees Create_HRM_PS_Employees()
        {
            string className = path + ".D_HRM_PS_Employees";
            return (IDAL_HRM_PS_Employees)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_PS_EMP_BOOK_BANKS Create_HRM_PS_EMP_BOOK_BANKS()
        {
            string className = path + ".D_HRM_PS_EMP_BOOK_BANKS";
            return (IDAL_HRM_PS_EMP_BOOK_BANKS)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_PS_EmployeeTypes Create_HRM_PS_EmployeeTypes()
        {
            string className = path + ".D_HRM_PS_EmployeeTypes";
            return (IDAL_HRM_PS_EmployeeTypes)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_PR_ExtraTypes Create_HRM_PR_ExtraTypes()
        {
            string className = path + ".D_HRM_PR_ExtraTypes";
            return (IDAL_HRM_PR_ExtraTypes)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_PR_PayrollDtls Create_HRM_PR_PayrollDtls()
        {
            string className = path + ".D_HRM_PR_PayrollDtls";
            return (IDAL_HRM_PR_PayrollDtls)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_WF_Finances Create_HRM_WF_Finances()
        {
            string className = path + ".D_HRM_WF_Finances";
            return (IDAL_HRM_WF_Finances)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_HRM_MP_Classes Create_HRM_MP_Classes()
        {
            string className = path + ".D_HRM_MP_Classes";
            return (IDAL_HRM_MP_Classes)Assembly.Load(path).CreateInstance(className);
        }

        //===============================ICM==========================================

        public static IDAL_ICM_Bid Create_ICM_Bid()
        {
            string className = path + ".D_ICM_Bid";
            return (IDAL_ICM_Bid)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_Bidder Create_ICM_Bidder()
        {
            string className = path + ".D_ICM_Bidder";
            return (IDAL_ICM_Bidder)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_BidOffer Create_ICM_BidOffer()
        {
            string className = path + ".D_ICM_BidOffer";
            return (IDAL_ICM_BidOffer)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_BidOfferCollateral Create_ICM_BidOfferCollateral()
        {
            string className = path + ".D_ICM_BidOfferCollateral";
            return (IDAL_ICM_BidOfferCollateral)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_BidReceive Create_ICM_BidReceive()
        {
            string className = path + ".D_ICM_BidReceive";
            return (IDAL_ICM_BidReceive)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_MasContactBank Create_ICM_MasContactBank()
        {
            string className = path + ".D_ICM_MasContactBank";
            return (IDAL_ICM_MasContactBank)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_DeliveryNote Create_ICM_DeliveryNote()
        {
            string className = path + ".D_ICM_DeliveryNote";
            return (IDAL_ICM_DeliveryNote)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_DeliveryNoteItem Create_ICM_DeliveryNoteItem()
        {
            string className = path + ".D_ICM_DeliveryNoteItem";
            return (IDAL_ICM_DeliveryNoteItem)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_DeliveryNotePenalty Create_ICM_DeliveryNotePenalty()
        {
            string className = path + ".D_ICM_DeliveryNotePenalty";
            return (IDAL_ICM_DeliveryNotePenalty)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_PurchaseOrder Create_ICM_PurchaseOrder()
        {
            string className = path + ".D_ICM_PurchaseOrder";
            return (IDAL_ICM_PurchaseOrder)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_PurchaseOrderContractCollateral Create_ICM_PurchaseOrderContractCollateral()
        {
            string className = path + ".D_ICM_PurchaseOrderContractCollateral";
            return (IDAL_ICM_PurchaseOrderContractCollateral)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_ICM_PurchaseOrderPrepayCollateral Create_ICM_PurchaseOrderPrepayCollateral()
        {
            string className = path + ".D_ICM_PurchaseOrderPrepayCollateral";
            return (IDAL_ICM_PurchaseOrderPrepayCollateral)Assembly.Load(path).CreateInstance(className);
        }

        public static IDAL_FIM_SelectReports Create_FIM_SelectReports()
        {
            string className = path + ".D_FIM_SelectReports";
            return (IDAL_FIM_SelectReports)Assembly.Load(path).CreateInstance(className);
        }
    }
}
